package top.korori.entity.bo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 
 * 后台用户
 * 
 *
 * @author korori
 * @since
 */
@Getter
@Setter
@ToString
public class SysUserBo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户id")
    private Long userId;

    @NotEmpty(message = "用户名不能为空")
    @ApiModelProperty("用户名")
    private String userName;


    @ApiModelProperty("性别")
    private Integer sex;

    @NotBlank(message = "密码不能为空")
    @Length(min = 6,message = "密码最小6位数")
    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("状态(0 正常, 1 封禁)")
    private Integer status;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("角色Id")
    private List<Long> roleIds;


}
